# Contributor: TBK <alpine@jjtc.eu>
# Maintainer: TBK <alpine@jjtc.eu>
pkgname=py3-more-itertools
_pkgname=more-itertools
pkgver=10.2.0
pkgrel=1
pkgdesc="More routines for operating on iterables, beyond itertools"
url="https://github.com/more-itertools/more-itertools"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-gpep517 py3-flit-core py3-wheel py3-installer"
subpackages="$pkgname-pyc"
source="https://github.com/more-itertools/more-itertools/archive/v$pkgver/more-itertools-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

replaces="py-more-itertools" # Backwards compatibility
provides="py-more-itertools=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m unittest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
910f053338a4e9ac2786e22d4736bad3bf0f424e65372815b80cb2c62a5a8eda08ca4b7802b0576ac79a1d56b070827a033fdbe6497888f6f373e7e37137c727  more-itertools-10.2.0.tar.gz
"
